
<#
.SYNOPSIS
Writes a trace message to the host (when verbose).
The trace message will be prefxed with the name of the function calling Write-Trace.
#>
function Write-Trace {
    [Cmdletbinding()]
    Param (
        <#
        .PARAMETER Message
            The message to write.
        #>
        [Parameter(Position=0, Mandatory=$true)]
        [string] $Message
    )

    $caller = (Get-Variable MyInvocation -Scope 1).Value
    $callerName = $caller.MyCommand.Name;

    Write-Verbose "$($callerName): $Message"
}
